<?php
// +----------------------------------------------------------------------
// | ManniuCMS
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://manniuyun.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: heitao <cms@manniuyun.com>
// +----------------------------------------------------------------------

namespace app\book\validate;

use think\Validate;

class BookCategory extends Validate{

    protected $rule = [
        'name' 		=> ['require'],
        'dirname' 	=> ['require'],
        'letter' 	=> ['require','length'=>1,'alpha'],
    ];

    protected $message  = [
        'name.require' 		=> '栏目名称不能为空',

        'dirname.require' 	=> '栏目目录不能为空',
        
        'letter.require' 	=> '首字母不能为空',
        'letter.length' 	=> '首字母长度必须为1',
        'letter.alpha'      => '首字母必须为英文字母',
    ];
}